package threeConsecutiveOdds;

public class Solution {
    public boolean threeConsecutiveOdds(int[] arr) {
        int i = 0;
        while (i<arr.length-2){
            int a = arr[i]%2;
            int b = arr[i+1]%2;
            int c = arr[i+2]%2;
            if(a*b*c==1){
                return true;
            }
            i = (b==1?i+1:(c==1?i+2:i+3));
        }
        return false;
    }
}
